import json
from data_structs import Text

def json_parser( text ):
    try:
        obj = json.loads(text) 
        venues = obj['response']['venues']
        if len( venues )==0:
            return None
        else:
            s = json.dumps(venues[0])
            t = Text("API",s)
            return t 
    except Exception as e:
            return None

